package demospringbootstarter.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

// 该注解可以把相同前缀的配置信息通过配置项名称映射成实体类，这里我们指定前缀"demo"，
// 就可以将以"demo"为前缀的配置项信息拿到
@ConfigurationProperties(prefix = "demo")
public class DemoProperties {
    private String sayWhat;
    private String toWho;

    public String getSayWhat() {
        return sayWhat;
    }

    public void setSayWhat(String sayWhat) {
        this.sayWhat = sayWhat;
    }

    public String getToWho() {
        return toWho;
    }

    public void setToWho(String toWho) {
        this.toWho = toWho;
    }
}
